package com.sss.demo.service.impl;

import com.sss.demo.dao.IGoods;
import com.sss.demo.dao.impl.IGoodsImpl;
import com.sss.demo.entity.Goods;
import com.sss.demo.service.GoodsService;

import java.util.List;

public class GoodsServiceImpl implements GoodsService {
    IGoods iGoods;
    @Override
    public List<Goods> getAllGoods() {
        iGoods=new IGoodsImpl();
        try {
            return iGoods.getAllGoods();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public List<Goods> getGoodsList(int page, int count) {
        iGoods=new IGoodsImpl();
        try {
            return iGoods.getGoodsList(page, count);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
